﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace Ny.Ci.EntityFrameworkCore.Migrations
{
    public partial class _20160803 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "CreationName",
                table: "User",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "LastModificationName",
                table: "User",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "User",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "SuggestionOperLog",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "Suggestion",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "PointsRecord",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "PointsLevel",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "MentionType",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "MentionOperLog",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "MentionInfo",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "HotspotPic",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "AttachmentInfo",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreationName",
                table: "User");

            migrationBuilder.DropColumn(
                name: "LastModificationName",
                table: "User");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "User");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "SuggestionOperLog");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "Suggestion");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "PointsRecord");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "PointsLevel");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "MentionType");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "MentionOperLog");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "MentionInfo");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "HotspotPic");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "AttachmentInfo");
        }
    }
}
